﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UserAdd.ascx.cs" Inherits="Admin_Users_UserAdd" %>
<%@ Register Src="../../Common/Alert.ascx" TagName="Alert" TagPrefix="uc1" %>
<div>
        <uc1:Alert ID="Alert1" runat="server" />
</div>
<div>
     <asp:Label  runat="server" ID="lblUsername" CssClass="text" Width ="120px"></asp:Label>
    <asp:TextBox ID ="txtUserName" runat ="server" MaxLength ="32" CssClass="boxlong" ValidationGroup="Input"></asp:TextBox><span style ="color :Red ;font-size:12px" >*</span>
</div>
<div>
    <asp:Label ID="lblEmail" runat ="server"  CssClass="text" Width ="120px"> </asp:Label>
    <asp:TextBox ID ="txtEmail" runat ="server" MaxLength ="50" CssClass="boxlong" ValidationGroup="Input"></asp:TextBox><span style ="color :Red ; font-size:12px">*</span>
</div>
<div>
    <asp:Label ID="lblRole" runat ="server"   CssClass="text" Width ="120px"> </asp:Label>
    <asp:DropDownList ID="ddlRole" runat="server" CssClass="boxlong">
    </asp:DropDownList></div>



<div>
    <asp:Label ID="lblPassword" runat ="server"   CssClass="text" Width ="120px"></asp:Label>
    <asp:TextBox ID ="txtPassword" runat ="server"  Text ="" MaxLength ="32" TextMode ="Password" CssClass="boxlong" ValidationGroup="Input"></asp:TextBox> 
</div>
<div>
    <asp:Label ID="lblConfirmPassword" runat ="server" CssClass="text" Width ="120px"></asp:Label>
    <asp:TextBox ID ="txtConfirmPassword" runat ="server" Text ="" MaxLength ="32" TextMode ="Password" CssClass="boxlong"></asp:TextBox>
</div>
<div>
    <asp:CheckBox ID="chkActive"  runat="server" CssClass="text" Checked=true   />
</div>
<div><br />
     <asp:Button ID ="btnSave" runat ="server" Width ="80px"  ValidationGroup="Input" OnClick="btnSave_Click" />&nbsp;&nbsp;
</div>
	
<!--Validator Empty-->
<asp:RequiredFieldValidator ID="rfvUsername" runat="server" SetFocusOnError="true"   ControlToValidate="txtUserName" Display="None" ValidationGroup="Input" Text="*"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfvEmail" runat="server" SetFocusOnError="true"   ControlToValidate="txtEmail" Display="None" ValidationGroup="Input" Text="*"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rfvPassword" runat="server" SetFocusOnError="true"   ControlToValidate="txtPassword" Display="None" ValidationGroup="Input" Text="*"></asp:RequiredFieldValidator>


<!--Check email-->
 <asp:RegularExpressionValidator 
            ID="revEmail" 
            runat="server" 
            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
            ControlToValidate="txtEmail" 
            Display="None" 
            ValidationGroup="Input" 
            SetFocusOnError="True" 
            Text="*">
</asp:RegularExpressionValidator>

 <asp:RegularExpressionValidator 
            ID="revPassword" 
            runat="server" 
            ValidationExpression="\S+" 
            ControlToValidate="txtPassword" 
            Display="None" 
            ValidationGroup="Input" 
            SetFocusOnError="True" 
            Text="*">
</asp:RegularExpressionValidator>

<asp:CompareValidator ID="cpvPassword" runat="server"  ControlToValidate="txtPassword"
 Operator="Equal" Type="String"
 ControlToCompare="txtConfirmPassword" ValidationGroup="Input" ForeColor="White" Display="None" SetFocusOnError="true"></asp:CompareValidator>
  <asp:ValidationSummary ID="ValidationSummary4" ShowMessageBox="true" runat="server" ValidationGroup="Input" ShowSummary="False" />
